#include <iostream>
#include <ofstream>
#include <ifstream>
#include <string>

using namespace std;

class FileManager{
public:
    int IsCreatedByThisProgram(string);
    int SaveToFile(string, string);
    int ReadFromFile(string,string);
};

int FileManager::SaveToFile(string stringToWrite, string fileName) 
{
    ofstream myfile;    
    myfile.open(fileName);
    if (myfile.is_open()) {
        myfile << stringToWrite;    
        myfile.close();
    } else {
        return 0;
    }
    return 1;
}

int FileManager::ReadFromFile(string stringRead, string fileName) {
    ifstream myfile;
    myfile.open(fileName);
    if (myfile.is_open()) {
        string read = getline(myfile);
        stringRead = read;
        myfile.close();
    } else {
        return 0;
    }
    return 1;
}